package com.example.demo.mapper;

import com.example.demo.entity.Userinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    //注册
    int reg(Userinfo userinfo);

    //根据用户查询userinfo对象
    Userinfo getUserByName(@Param("username") String username);
    //根据用户IdD查询userinfo对象
    Userinfo getUserById(@Param(("id")) Integer id);
}
